package com.tckdq.tcc.feign;

import com.tckdq.tcc.domain.Login;
import com.tckdq.tcc.exception.GlobalException;
import com.tckdq.tcc.result.JsonResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class FeignFallbackFactory implements FallbackFactory<Feign> {
    @Override
    public Feign create(Throwable throwable) {
        return new Feign() {
            @Override
            public JsonResult saveRegister(Login login) {
                return JsonResult.error("uaa保存t_login失败");
            }

        };
    }
}
